/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbactivmed")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbactivmed.findAll", query = "SELECT p FROM Pyfntbactivmed p"),
    @NamedQuery(name = "Pyfntbactivmed.findByPyfntbactivmedid", query = "SELECT p FROM Pyfntbactivmed p WHERE p.pyfntbactivmedid = :pyfntbactivmedid")})
public class Pyfntbactivmed implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbactivmedid")
    private Integer pyfntbactivmedid;
    @JoinColumn(name = "pyfntbpoaprogid", referencedColumnName = "pyfntbpoaprogid")
    @ManyToOne(optional = false)
    private Pyfntbpoaprog pyfntbpoaprogid;
    @JoinColumn(name = "pyfntbmedverifid", referencedColumnName = "pyfntbmedverifid")
    @ManyToOne(optional = false)
    private Pyfntbmedverif pyfntbmedverifid;

    public Pyfntbactivmed() {
    }

    public Pyfntbactivmed(Integer pyfntbactivmedid) {
        this.pyfntbactivmedid = pyfntbactivmedid;
    }

    public Integer getPyfntbactivmedid() {
        return pyfntbactivmedid;
    }

    public void setPyfntbactivmedid(Integer pyfntbactivmedid) {
        this.pyfntbactivmedid = pyfntbactivmedid;
    }

    public Pyfntbpoaprog getPyfntbpoaprogid() {
        return pyfntbpoaprogid;
    }

    public void setPyfntbpoaprogid(Pyfntbpoaprog pyfntbpoaprogid) {
        this.pyfntbpoaprogid = pyfntbpoaprogid;
    }

    public Pyfntbmedverif getPyfntbmedverifid() {
        return pyfntbmedverifid;
    }

    public void setPyfntbmedverifid(Pyfntbmedverif pyfntbmedverifid) {
        this.pyfntbmedverifid = pyfntbmedverifid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbactivmedid != null ? pyfntbactivmedid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbactivmed)) {
            return false;
        }
        Pyfntbactivmed other = (Pyfntbactivmed) object;
        if ((this.pyfntbactivmedid == null && other.pyfntbactivmedid != null) || (this.pyfntbactivmedid != null && !this.pyfntbactivmedid.equals(other.pyfntbactivmedid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbactivmed[ pyfntbactivmedid=" + pyfntbactivmedid + " ]";
    }
    
}
